package cn.iocoder.yudao.module.els.apiImpl;

import cn.iocoder.yudao.module.els.generatorCode.CodeGeneratorApi;
import cn.iocoder.yudao.module.els.service.codeGenerator.CodeGeneratorService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author cjc
 * @Date 2024/7/4 14:23
 * @Description: 编码生成器api实现类
 * @Version 1.0
 */
@Service
public class CodeGeneratorApiImpl implements CodeGeneratorApi {

    @Resource
    private CodeGeneratorService generatorService;

    @Override
    public String getNextCode(String codeType){
        return generatorService.getNextCode(codeType,null);
    }

    @Override
    public String getNextCode(String codeType, Object businessObj){
        return generatorService.getNextCode(codeType,businessObj);
    }

    @Override
    public List<String> getNextCodes(String codeType, int size){
        return generatorService.getNextCodes(codeType,null,size);
    }

    @Override
    public List<String> getNextCodes(String codeType, Object businessObj, int size){
        return generatorService.getNextCodes(codeType,businessObj,size);
    }
}
